package br.uefs.dexa.rfframework.gui.factory;

import br.uefs.dexa.rfframework.gui.impl.DigitalImagePanel;
//import br.uefs.dexa.rfframework.gui.impl.ImageQueryPatternPanel;
import br.uefs.dexa.rfframework.gui.impl.ImageQueryPatternPanel;
import br.uefs.dexa.rfframework.gui.impl.ImageSetVisualizationPanel;
import br.uefs.dexa.rfframework.gui.impl.RelevantImagePanel;
//import br.uefs.dexa.rfframework.gui.impl.RelevantImagePanel;
import br.uefs.dexa.rfframework.gui.impl.SimpleRFUserGUI;
import br.uefs.dexa.rfframework.gui.impl.alt.AltDigitalImagePanel;
//import br.uefs.dexa.rfframework.gui.impl.alt.AltImageQueryPatternPanel;
//import br.uefs.dexa.rfframework.gui.impl.alt.AltRelevantImagePanel;
import br.uefs.dexa.rfframework.gui.impl.alt.AltSimpleRFUserGUI;
import br.uefs.dexa.rfframework.gui.interfaces.DigitalObjectPanel;
import br.uefs.dexa.rfframework.gui.interfaces.ObjectSetContainerPanel;
import br.uefs.dexa.rfframework.gui.interfaces.OutputObjectSetContainerPanel;
import br.uefs.dexa.rfframework.gui.interfaces.RFUserGUI;
import br.uefs.dexa.rfframework.gui.utils.paging.PagingOutputObjectSetContainerPanel;
import br.unicamp.ic.lis.rfframework.objects.IDigitalObject;

public class AltImageGUIFactory extends GUIAbstractFactory {

private static AltImageGUIFactory instance;
	
	//Singleton
	public static AltImageGUIFactory getInstance() {
		if (instance == null)
			instance = new AltImageGUIFactory();
		return instance;
	}
	
	@Override
	public RFUserGUI getGUI() {
		return AltSimpleRFUserGUI.getInstance();
	}
	
	@Override
	public ObjectSetContainerPanel getQueryPatternPanel(RFUserGUI gui) {
		//return new ImageQueryPatternPanel(gui);
		//return new AltImageQueryPatternPanel(gui);
		return new ImageQueryPatternPanel(gui);
	}

	@Override
	public ObjectSetContainerPanel getRelevantObjectsPanel(RFUserGUI gui) {
		//return new RelevantImagePanel(gui);
		//return new AltRelevantImagePanel(gui);
		return new RelevantImagePanel(gui);
	}

	@Override
//	public ObjectSetVisualizationPanel getObjectSetVisualizationPanel(RFUserGUI gui) {
//		//return new ImageSetVisualizationPanel(gui);
//		return new PagingObjectSetVisualizationPanel((new ImageSetVisualizationPanel(gui)));
//	}
	
	public OutputObjectSetContainerPanel getObjectSetVisualizationPanel(RFUserGUI gui) {
		//return new ImageSetVisualizationPanel(gui);
		return new PagingOutputObjectSetContainerPanel((new ImageSetVisualizationPanel(gui)));
	}

//	@Override
//	public DigitalObjectPanel getDigitalObjectPanel(IDigitalObject object, int heigth) {
//		//return new DigitalImagePanel(object, heigth);
//		return new AltDigitalImagePanel(object, heigth);
//	}
	
	@Override
	public DigitalObjectPanel getVisualizationObjectPanel(IDigitalObject object) {
		return new AltDigitalImagePanel(object, AltDigitalImagePanel.DEFAULT_VISUALIZATION_IMAGE_HEIGTH);
	}
	
	@Override
	public DigitalObjectPanel getQueryObjectPanel(IDigitalObject object) {
		return new AltDigitalImagePanel(object, AltDigitalImagePanel.DEFAULT_QUERY_IMAGE_HEIGTH );
	}
	
	@Override
	public DigitalObjectPanel getRelevantObjectPanel(IDigitalObject object) {
		return new AltDigitalImagePanel(object, AltDigitalImagePanel.DEFAULT_RELEVANT_IMAGE_HEIGTH );
	}

}
